/**
 * 报价信息 api 封装
 *
 * @Author:    zzx
 * @Date:      2025-08-07 19:37:04
 * @Copyright  zzx
 */
import { postRequest, getRequest } from '/@/lib/axios';

export const quotationApi = {

  /**
   * 分页查询  @author  zzx
   */
  queryPage : (param) => {
    return postRequest('/quotation/queryPage', param);
  },

  /**
   * 增加  @author  zzx
   */
  add: (param) => {
      return postRequest('/quotation/add', param);
  },

  /**
   * 修改  @author  zzx
   */
  update: (param) => {
      return postRequest('/quotation/update', param);
  },


  /**
   * 删除  @author  zzx
   */
  delete: (id) => {
      return getRequest(`/quotation/delete/${id}`);
  },

  /**
   * 批量删除  @author  zzx
   */
  batchDelete: (idList) => {
      return postRequest('/quotation/batchDelete', idList);
  },

  /**
   * 获取报价单详情-包含报价明细  @author  zzx
   */
  detail: (id) => {
      return getRequest(`/quotation/queryDetail/${id}`);
  },

  /**
   * 获取报价单详情  @author  zzx
   */
  sortDetail: (id) => {
      return getRequest(`/quotation/querySortDetail/${id}`);
  },

  /**
   * 更新报价  @author  zzx
   */
  edit: (params) => {
      return postRequest(`/quotation/addOrUpdate`, params);
  },

  /**
   * 获取报价明细列表  @author  zzx
   */
  queryItems: (params) => {
      return postRequest(`/quotation/queryItemsPage`, params);
  },

};
